package br.com.webhomesites.principal;

import br.com.webhomesites.configuracao.utils.ConfiguracaoInstancias;
import br.com.webhomesites.coleta.view.DesktopColetaView;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

//classe que contém o método main
public class ColetaRun {
    
     public static void main(String args[]) throws Exception {
         
         
     //try pra seta o look and fell do programa. o looke and fell usado é o nimbus    
    try {
    for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
            UIManager.setLookAndFeel(info.getClassName());
            break;
        }
    }
        
//  String laf = UIManager.getSystemLookAndFeelClassName();
//UIManager.setLookAndFeel(laf);
} catch (UnsupportedLookAndFeelException e) {

} catch (ClassNotFoundException e) {

} catch (InstantiationException e) {

} catch (IllegalAccessException e) {

}
        //roda o programa com o look nd feel setado
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                //LoginEntrada log = new LoginEntrada();
                //log.setVisible(true);
                DesktopColetaView dk = new DesktopColetaView();
                ConfiguracaoInstancias.setDesktopColeta(dk);
                dk.setExtendedState(JFrame.MAXIMIZED_BOTH);
                dk.setLocationByPlatform(true);
                dk.setSize(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getSize());
                dk.setVisible(true);
                
            }
        });

    }
}
